<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of column
 *
 * @author joaoneto
 */
class JLoja_Html_Table_Header
{
	private $_columns;
	
	public function addColumn( $type, $name, $style )
	{
		$fnc = 'header_type_' . $type;
		$this->_columns[] = $fnc( JText::_( $name ), $style );
	}

	public function getHeader()
	{
		return implode( "\n\t", $this->_columns );
	}
}


function header_type_name( $name, $params )
{
	$html = '<th';
	$rowBegin = '</th>';
	$tag = "";
	$end = "";

	foreach( $params as $key => $val ){
		$html .= " " . $key . '="' . $val . '"';
	}

	$html .= ">";

	$html .= " " . $name;
	$html .= $rowBegin;

	return $html;
}

function header_type_selectAll( $name, $params )
{

}

function header_type_instantSave( $name, $params )
{

}